Xbasic
Array size Method
Syntax
dim Size as N = <array>.size([N dimension])
Arguments
- dimensionNumeric
Default value is 1. The index of the array dimension. Used to get the size of each dimension in a multidimensional array.
Returns
- SizeNumeric
Returns the size of the array.
Description
Return the extent of the array optional dimension for multidimensional arrays.
Discussion
The <array>.size() method returns size of an array.
Examples
The following shows how to get the size of a multi-dimensional array.
dim xa[3,5] as C ? xa.size(1) = 3 ? xa.size(2) = 5 ? xa.dimensions() = 2